﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class Product
    {
        /// <summary>
        /// 商品唯⼀编码（如JD123456）
        /// </summary>
        [Key]
        [Required]
        [StringLength(32)]
        public string? spu_id { get; set; }

        /// <summary>
        /// 商品标题（含关键词）
        /// </summary>
        [Required]
        [StringLength(256)]
        public string? title { get; set; }

        /// <summary>
        /// 三级分类ID
        /// </summary>
        [Required]
        public int category_id { get; set; }

        /// <summary>
        /// 品牌ID
        /// </summary>
        [Required]
        public int brand_id { get; set; }

        /// <summary>
        /// 主图URL
        /// </summary>
        [Required]
        [StringLength(512)]
        public string? MyProperty { get; set; }

        /// <summary>
        /// 上下架状态（0下架/1上架）
        /// </summary>
        [Required]
        public int status { get; set; }

        /// <summary>
        /// 总库存量
        /// </summary>
        [Required]
        public int MyProperty1 { get; set; }
    }
}
